#include "StaticText.h"

StaticText::StaticText()
{
	m_hf = CreateFont(15, 0, 0, 0, FW_NORMAL, FALSE, FALSE, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS, "Arial");
}
StaticText::~StaticText()
{

}
bool StaticText::Setup(HWND a_hWnd, HINSTANCE a_hInst, int a_xPos, int a_yPos, int a_width, int a_height, char* a_label)
{
	m_hWnd = CreateWindowEx(NULL, "STATIC", a_label, WS_CHILD | WS_VISIBLE | SS_CENTER, a_xPos, a_yPos, a_width, a_height, a_hWnd, NULL, a_hInst, NULL);
	if(m_hWnd == NULL)
	{
		return false;
	}
	SendMessage(m_hWnd, WM_SETFONT, (WPARAM)m_hf, (LPARAM)true);	
	
	UpdateWindow(m_hWnd);
	ShowWindow(m_hWnd, SW_SHOW);

	return true;
}
